<!DOCTYPE html>
<html>
<!-- Created by GNU Texinfo 7.1, https://www.gnu.org/software/texinfo/ -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<!-- Copyright © 1988-2023 Free Software Foundation, Inc.

Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.3 or
any later version published by the Free Software Foundation; with the
Invariant Sections being "Funding Free Software", the Front-Cover
Texts being (a) (see below), and with the Back-Cover Texts being (b)
(see below).  A copy of the license is included in the section entitled
"GNU Free Documentation License".

(a) The FSF's Front-Cover Text is:

A GNU Manual

(b) The FSF's Back-Cover Text is:

You have freedom to copy and modify this GNU Manual, like GNU
     software.  Copies published by the Free Software Foundation raise
     funds for GNU development. -->
<title>All Debuggers (GNU Compiler Collection (GCC) Internals)</title>

<meta name="description" content="All Debuggers (GNU Compiler Collection (GCC) Internals)">
<meta name="keywords" content="All Debuggers (GNU Compiler Collection (GCC) Internals)">
<meta name="resource-type" content="document">
<meta name="distribution" content="global">
<meta name="Generator" content="makeinfo">
<meta name="viewport" content="width=device-width,initial-scale=1">

<link href="index.html" rel="start" title="Top">
<link href="Option-Index.html" rel="index" title="Option Index">
<link href="index.html#SEC_Contents" rel="contents" title="Table of Contents">
<link href="Debugging-Info.html" rel="up" title="Debugging Info">
<link href="DWARF.html" rel="next" title="DWARF">
<style type="text/css">
<!--
a.copiable-link {visibility: hidden; text-decoration: none; line-height: 0em}
span:hover a.copiable-link {visibility: visible}
strong.def-name {font-family: monospace; font-weight: bold; font-size: larger}
-->
</style>


</head>

<body lang="en">
<div class="subsection-level-extent" id="All-Debuggers">
<div class="nav-panel">
<p>
Next: <a href="DWARF.html" accesskey="n" rel="next">Macros for DWARF Output</a>, Up: <a href="Debugging-Info.html" accesskey="u" rel="up">Controlling Debugging Information Format</a> &nbsp; [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Option-Index.html" title="Index" rel="index">Index</a>]</p>
</div>
<hr>
<h4 class="subsection" id="Macros-Affecting-All-Debugging-Formats"><span>18.21.1 Macros Affecting All Debugging Formats<a class="copiable-link" href="#Macros-Affecting-All-Debugging-Formats"> &para;</a></span></h4>

<p>These macros affect all debugging formats.
</p>
<dl class="first-deffn first-defmac-alias-first-deffn">
<dt class="deffn defmac-alias-deffn" id="index-DEBUGGER_005fREGNO"><span class="category-def">Macro: </span><span><strong class="def-name">DEBUGGER_REGNO</strong> <var class="def-var-arguments">(<var class="var">regno</var>)</var><a class="copiable-link" href="#index-DEBUGGER_005fREGNO"> &para;</a></span></dt>
<dd><p>A C expression that returns the debugger register number for the compiler
register number <var class="var">regno</var>.  In the default macro provided, the value
of this expression will be <var class="var">regno</var> itself.  But sometimes there are
some registers that the compiler knows about and debugger does not, or vice
versa.  In such cases, some register may need to have one number in the
compiler and another for debugger.
</p>
<p>If two registers have consecutive numbers inside GCC, and they can be
used as a pair to hold a multiword value, then they <em class="emph">must</em> have
consecutive numbers after renumbering with <code class="code">DEBUGGER_REGNO</code>.
Otherwise, debuggers will be unable to access such a pair, because they
expect register pairs to be consecutive in their own numbering scheme.
</p>
<p>If you find yourself defining <code class="code">DEBUGGER_REGNO</code> in way that
does not preserve register pairs, then what you must do instead is
redefine the actual register numbering scheme.
</p></dd></dl>

<dl class="first-deffn first-defmac-alias-first-deffn">
<dt class="deffn defmac-alias-deffn" id="index-DEBUGGER_005fAUTO_005fOFFSET"><span class="category-def">Macro: </span><span><strong class="def-name">DEBUGGER_AUTO_OFFSET</strong> <var class="def-var-arguments">(<var class="var">x</var>)</var><a class="copiable-link" href="#index-DEBUGGER_005fAUTO_005fOFFSET"> &para;</a></span></dt>
<dd><p>A C expression that returns the integer offset value for an automatic
variable having address <var class="var">x</var> (an RTL expression).  The default
computation assumes that <var class="var">x</var> is based on the frame-pointer and
gives the offset from the frame-pointer.  This is required for targets
that produce debugging output for debugger and allow the frame-pointer to be
eliminated when the <samp class="option">-g</samp> option is used.
</p></dd></dl>

<dl class="first-deffn first-defmac-alias-first-deffn">
<dt class="deffn defmac-alias-deffn" id="index-DEBUGGER_005fARG_005fOFFSET"><span class="category-def">Macro: </span><span><strong class="def-name">DEBUGGER_ARG_OFFSET</strong> <var class="def-var-arguments">(<var class="var">offset</var>, <var class="var">x</var>)</var><a class="copiable-link" href="#index-DEBUGGER_005fARG_005fOFFSET"> &para;</a></span></dt>
<dd><p>A C expression that returns the integer offset value for an argument
having address <var class="var">x</var> (an RTL expression).  The nominal offset is
<var class="var">offset</var>.
</p></dd></dl>

<dl class="first-deffn first-defmac-alias-first-deffn">
<dt class="deffn defmac-alias-deffn" id="index-PREFERRED_005fDEBUGGING_005fTYPE"><span class="category-def">Macro: </span><span><strong class="def-name">PREFERRED_DEBUGGING_TYPE</strong><a class="copiable-link" href="#index-PREFERRED_005fDEBUGGING_005fTYPE"> &para;</a></span></dt>
<dd><p>A C expression that returns the type of debugging output GCC should
produce when the user specifies just <samp class="option">-g</samp>.  Define
this if you have arranged for GCC to support more than one format of
debugging output.  Currently, the allowable values are
<code class="code">DWARF2_DEBUG</code>, <code class="code">VMS_DEBUG</code>,
and <code class="code">VMS_AND_DWARF2_DEBUG</code>.
</p>
<p>When the user specifies <samp class="option">-ggdb</samp>, GCC normally also uses the
value of this macro to select the debugging output format, but with two
exceptions.  If <code class="code">DWARF2_DEBUGGING_INFO</code> is defined, GCC uses the
value <code class="code">DWARF2_DEBUG</code>.
</p>
<p>The value of this macro only affects the default debugging output; the
user can always get a specific type of output by using  <samp class="option">-gdwarf-2</samp>,
or <samp class="option">-gvms</samp>.
</p></dd></dl>

<dl class="first-deffn first-defmac-alias-first-deffn">
<dt class="deffn defmac-alias-deffn" id="index-DEFAULT_005fGDB_005fEXTENSIONS"><span class="category-def">Macro: </span><span><strong class="def-name">DEFAULT_GDB_EXTENSIONS</strong><a class="copiable-link" href="#index-DEFAULT_005fGDB_005fEXTENSIONS"> &para;</a></span></dt>
<dd><p>Define this macro to control whether GCC should by default generate
GDB&rsquo;s extended version of debugging information.  If you don&rsquo;t define the
macro, the default is 1: always generate the extended information
if there is any occasion to.
</p></dd></dl>

</div>
<hr>
<div class="nav-panel">
<p>
Next: <a href="DWARF.html">Macros for DWARF Output</a>, Up: <a href="Debugging-Info.html">Controlling Debugging Information Format</a> &nbsp; [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Option-Index.html" title="Index" rel="index">Index</a>]</p>
</div>



</body>
</html>
